<?php

include '../../../configuration.php';

$smarty->template_dir = LOCAL_PATH.'administrator/main/templates/';
$smarty->compile_dir = LOCAL_PATH.'administrator/main/templates_c/';
$smarty->config_dir = LOCAL_PATH.'administrator/main/configs';

$smarty->compile_check = true;
//$smarty->debugging = true;

$result = mysql_query("SELECT * FROM categories");

$cat_title = array();

while ($rows = mysql_fetch_array($result, MYSQL_ASSOC)) {
	$cat_title[] = "<option>".$rows["cat_title"]."</option>";
}

$smarty->assign('categories',$cat_title);
$smarty->assign('date',date('Y-m-d'));
$smarty->assign('c_date',"<input type='hidden' name='cdate' value=".date('Y-m-d H:i:s')." />");
$smarty->assign('today',"<input type='hidden' name='udate' value=".date('Y-m-d H:i:s')." />");

include '../../check.php';
if ($checking == 1)
	$smarty->display('insert_question.tpl');
else echo "You are not autorised"; exit;
?>